home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1988 April / Ahoy_Magazine_88-04_1988_Double_L.d64 / Sing A String (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  736b  |  20 lines

  1. 10 rem play command for c-64
  2. 20 rem set up music note array
  3. 30 dim h(107),l(107):s=54272
  4. 40 print"wait...creating note array"
  5. 50 forx=.to62:m=2703*(2^((x-20)/12)):ifm>65535thenm=65535
  6. 60 h(x)=int(m/256):l(x)=m-h(x)*256:next
  7. 70 print"perils and danger...."
  8. 80 m$="a6c6g6a6c6g6a4c4g4c8g8d8e6c6g6d6e6":gosub140
  9. 90 print"the light of a new day...."
  10. 100 m$="q2s2l3l2q2s3l1m1n1o2s2q1r2p2y6":gosub140
  11. 110 end
  12. 120 rem sid stringsinger subroutine
  13. 130 rem notes and durations in m$
  14. 140 forx=.to24:pokes+x,.:next:pokes+5,4:pokes+12,4:pokes+19,4:pokes+6,241:pokes+13,241
  15. 150 pokes+20,241:pokes+4,33:pokes+11,33:pokes+19,33:pokes+24,15
  16. 160 forn=1tolen(m$)step2:m=asc(mid$(m$,n,1))-33:d=val(mid$(m$,n+1,1))
  17. 170 pokes+1,h(m):pokes,l(m):pokes+8,h(m+3):pokes+7,l(m+3)
  18. 180 pokes+15,h(m+12):pokes+14,l(m+12):forx=.tod*100:next:next
  19. 190 forn=15to.step-1:pokes+24,n:forx=.to50:next:next:return
  20.